package com.study.spring.ch05.pojo;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.NumberFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import org.springframework.format.annotation.NumberFormat.Style;

public class FormatterModel {

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
	public double getDiscount() {
		return discount;
	}
	public void setDiscount(double discount) {
		this.discount = discount;
	}
	public double getSumMoney() {
		return sumMoney;
	}
	public void setSumMoney(double sumMoney) {
		this.sumMoney = sumMoney;
	}
	public Date getRegisterDate() {
		return registerDate;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setRegisterDate(Date registerDate) {
		this.registerDate = registerDate;
	}
	public Date getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Date orderDate) {
		this.orderDate = orderDate;
	}




	@NumberFormat(style=Style.NUMBER, pattern="#,###")//通用样式
	  private int totalCount;
	  @NumberFormat(style=Style.PERCENT)//百分数样式
	  private double discount;
	  
	
	@NumberFormat(style=Style.CURRENCY)//货币样式
	  private double sumMoney;
	  @DateTimeFormat(iso=ISO.DATE)//ISO.DATE(yyyy-MM-dd)
	  private Date registerDate;
	  @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")//指定解析/格式化字段数据的模式，如”yyyy-MM-dd HH:mm:ss”
	  private Date orderDate;

}
